import request from '@/utils/request'

// 获取课题列表（分页+搜索）
export function getList(params) {
  return request({
    url: '/topic/page',
    method: 'get',
    params
  })
}
export function getOptionList() {
  return request({
    url: '/topic',
    method: 'get'
  })
}
// 新增课题
export function createTopic(data) {
  return request({
    url: '/topic',
    method: 'post',
    data
  })
}

// 删除课题
export function deleteTopic(data) {
  return request({
    url: '/topic/' + data.topicId,
    method: 'delete'
  })
}
